#include "taskfactory.hxx"
#include "task.hxx"
#include "inusetask.hxx"
#include "yktask.hxx"

Task* TaskFactory::CreateTask(int type, const User* user, int id, const std::string& info, Task::TaskStatus status, FileLog* filelog)
{
	Task* task = NULL;

	switch (type)
	{
	case Task::NEW_CAR_CHOOSE_NO:
		//task = new Task(user, id, info, status, filelog);
		break;
	case Task::INUSE_CAR_CHOOSE_NO:
		//task = new InuseTask(user, id, info, status, filelog);
		break;
	case Task::YU_YUE_KAO_SHI:
		task = new YKTask(user, id, info, status, filelog);
	default:
		break;
	}
	
	return task;
}